// For the OTHER.SO we will try and use symbols from both the main nexe and
// the shared so.

extern int g_share_data;
extern int* g_share_ptr;

extern int g_main_data;
extern int* g_main_ptr;

typedef struct {
	int* share_loc;
	int share_val;
	int* share_ptr_val;
	int** share_ptr_loc;

	int* main_loc;
	int main_val;
	int* main_ptr_val;
	int** main_ptr_loc;
} info_t;

static void SetData(info_t* ptr) {
	ptr->share_loc = &g_share_data;
	ptr->share_val = g_share_data;

	ptr->share_ptr_val = g_share_ptr;
	ptr->share_ptr_loc = &g_share_ptr;

	ptr->main_loc = &g_main_data;
	ptr->main_val = g_main_data;

	ptr->main_ptr_val = g_main_ptr;
	ptr->main_ptr_loc = &g_main_ptr;
}

extern void InitMain();
extern void InitOther();
extern void InitShare();

extern info_t* GetShareInfo();
extern info_t* GetOtherInfo();
extern info_t* GetMainInfo();